package com.jgp.security.config;

import com.jgp.common.security.UserAdapter;
import com.jgp.security.pojo.UserInfo;
import com.jgp.security.secmodel.SecUser;

import java.io.IOException;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2019/1/10
 */
public interface SecUserAdapter extends UserAdapter {
    
    default boolean checkPwd(String userId, String pwd) throws IOException {
        return false;
    }
    
    default void resetPwd(String userId, String pwd) { }
    
    default SecUser operatorPwd(SecUser user, String pwd) throws IOException {return null;}
    
    default String encryptPwd(String plainPwd, String sugar, Integer encryptTime) {
        return null;
    }
    
    default String decryptDbPwdAes(String plainPwd) throws IOException {
        return null;
    }
    
    default UserInfo currentUser() {
        return null;
    }
    default UserInfo getUserInfoBySessionId(String sessionId) {
        return null;
    }
}
